<template>
  <div>
    <div style="display: flex;border: solid 1px #aaa;padding: 10px">
      <button @click="show(1)">测试1</button>
      <button @click="show(2)">测试2</button>
    </div>

    <demo1 v-if="type === 1" />
    <demo2 v-if="type === 2" />
  </div>
</template>

<script>
  import Demo1 from './components/virtual-tree/demo/index.vue'
  import Demo2 from './components/virtual-tree/demo/vehicleDemo/vehicleDemo.vue'
export default {
  name: 'aaa',
  components: {
    Demo1,
    Demo2
  },
  data() {
    return {
      type: 2
    }
  },
  methods: {
    async show(type) {
      this.type = null
      await this.$nextTick()
      this.type = type
    }
  }
}
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
